package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.File;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.xss.Xss;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

/**
 * 通知留言表 sys_message
 *
 * @author ruoyi
 */
public class SysMessage extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 留言ID */
    private Long id;

    /** 留言标题 */
    private String messageTitle;

    /** 留言类型类型（1 建议，2 投诉，3 咨询） */
    private String messageType;

    /** 留言内容 */
    private String messageContent;

    /** 留言状态（1处理中，2已处理 3 已结束） */
    private String messageStatus;

    /** 留言时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date messageTime;

    /** 文件id */
    private String fileId;

    private String delFlag;

    private List<SysReply> sysReplyList;

    private List<File> messageFileList;

    private String nickName;//用户的真实名字

    private SysUser sysUser;

    /** 回复时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date replyTime;

    /** 留言类型类型（1 建议，2 投诉，3 咨询） */
    private String messageTypeName;

    /** 处理状态：1处理中，2已处理 3 已结束 */
    private String messageStatusName;


    public Date getReplyTime() {
        return replyTime;
    }

    public void setReplyTime(Date replyTime) {
        this.replyTime = replyTime;
    }

    public String getMessageStatusName() {
        return messageStatusName;
    }

    public void setMessageStatusName(String messageStatusName) {
        this.messageStatusName = messageStatusName;
    }

    public String getMessageTypeName() {
        return messageTypeName;
    }

    public void setMessageTypeName(String messageTypeName) {
        this.messageTypeName = messageTypeName;
    }

    public SysUser getSysUser() {
        return sysUser;
    }

    public void setSysUser(SysUser sysUser) {
        this.sysUser = sysUser;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public List<SysReply> getSysReplyList() {
        return sysReplyList;
    }

    public void setSysReplyList(List<SysReply> sysReplyList) {
        this.sysReplyList = sysReplyList;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }


    public List<File> getMessageFileList() {
        return messageFileList;
    }

    public void setMessageFileList(List<File> messageFileList) {
        this.messageFileList = messageFileList;
    }

    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public String getMessageStatus() {
        return messageStatus;
    }

    public void setMessageStatus(String messageStatus) {
        this.messageStatus = messageStatus;
    }

    public Date getMessageTime() {
        return messageTime;
    }

    public void setMessageTime(Date messageTime) {
        this.messageTime = messageTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setMessageTitle(String messageTitle)
    {
        this.messageTitle = messageTitle;
    }

    @Xss(message = "留言标题不能包含脚本字符")
    @NotBlank(message = "留言标题不能为空")
    @Size(min = 0, max = 50, message = "留言标题不能超过50个字符")
    public String getMessageTitle()
    {
        return messageTitle;
    }

    public void setMessageType(String messageType)
    {
        this.messageType = messageType;
    }

    public String getMessageType()
    {
        return messageType;
    }

    public void setMessageContent(String messageContent)
    {
        this.messageContent = messageContent;
    }

    public String getMessageContent()
    {
        return messageContent;
    }

    public void setStatus(String messageStatus)
    {
        this.messageStatus = messageStatus;
    }

    public String getStatus()
    {
        return messageStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("messageTitle", getMessageTitle())
            .append("messageType", getMessageType())
            .append("messageContent", getMessageContent())
            .append("messageStatus", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
